home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / ColorExtension / Sources / CELibInit.cpp < prev    next >
Encoding:
Text File  |  1996-12-16  |  2.0 KB  |  83 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                CELibInit.cpp
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef CEPRVGLU_H
  11. #include "CEPrvGlu.h"
  12. #endif
  13.  
  14. //========================================================================================
  15. // Prototypes
  16. //========================================================================================
  17.  
  18. #ifdef FW_BUILD_MAC
  19.  
  20. extern "C" pascal OSErr CE_CFMINIT (CFragInitBlockPtr initBlkPtr);
  21. extern "C" pascal void  CE_CFMTERM (void);
  22.  
  23. #ifdef __MWERKS__
  24. #    if __MWERKS__ < 0x0800
  25. extern "C" void __sinit();
  26. extern "C" void    __destroy_global_chain(void);
  27. #    else
  28. extern "C" short __initialize();
  29. extern "C" void    __terminate(void);
  30. #    endif
  31. #elif defined __MRC__
  32. extern "C" __init_lib(CFragInitBlockPtr initBlkPtr);
  33. #endif
  34.  
  35. #endif // FW_BUILD_MAC
  36.  
  37.  
  38. #ifdef FW_BUILD_MAC
  39. //----------------------------------------------------------------------------------------
  40. // CE_CFMINIT (Has to be upper case because of the 68K Linker)
  41. //----------------------------------------------------------------------------------------
  42.  
  43. extern "C" pascal OSErr CE_CFMINIT(CFragInitBlockPtr initBlkPtr)
  44. {
  45.     OSErr err = noErr;
  46.     
  47.     // Shared libraries don't get there static objects initialized correctly without
  48.     // calling __initialize or __init_lib for MetroWerks or MrC respectively.
  49.     
  50. #ifdef __MWERKS__
  51.     #if __MWERKS__ < 0x0800
  52.         __sinit();
  53.     #else
  54.         __initialize();
  55.     #endif
  56. #elif defined __MRC__
  57.     __init_lib(initBlkPtr);
  58. #endif
  59.     return err;
  60. }
  61.  
  62. #endif
  63.  
  64. #ifdef FW_BUILD_MAC
  65. //----------------------------------------------------------------------------------------
  66. // CE_CFMTERM
  67. //----------------------------------------------------------------------------------------
  68.  
  69. extern "C" pascal void CE_CFMTERM(void)
  70. {
  71. #ifdef __MWERKS__
  72. #        if __MWERKS__ < 0x0800
  73.     __destroy_global_chain();
  74. #        else
  75.     __terminate();
  76. #        endif
  77. #endif
  78. }
  79.  
  80. #endif
  81.  
  82.  
  83.